<template>
  <el-switch v-model="value" 
  :active-action-icon="Sunny"
  :inactive-action-icon="Moon"
  @change="handleChange">
  </el-switch>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { Sunny, Moon } from '@element-plus/icons-vue'
import { toggleDark } from '@/comm/color.js'

const value = ref(false)

function handleChange(){
  toggleDark()
}
</script>